<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=657267
-->
<head>
  <title>Test for Bug 657267</title>
  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=657267">Mozilla Bug 657267</a>
<p id="display"></p>
<div id="content" style="display: none">
  
</div>
<pre id="test">
<script type="application/javascript">

SimpleTest.waitForExplicitFinish();

/** Test for Bug 657267 **/
function go() {
    var win = $('ifr').contentWindow;
    try {
        is(win.a(), undefined, "Shouldn't be seeing this");
        var thrown = false;
    } catch (e) {
        thrown = /Permission denied/i.test(e);
    }
    ok(thrown, "Should have thrown");
    SimpleTest.finish();
}

</script>
</pre>

<iframe src="jar:http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/bug657267.jar!/file_bug657267.html"
        id="ifr"
        onload="go()">
</iframe>
</body>
</html>
